
package mytomcat.util;

import mytomcat.dto.XmlNodeInfo;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;

import java.io.File;
import java.util.*;

/**
 * <ul>
 * <li>Title: -Dom4jParseUtil</li>
 * <li>Description: TODO </li>
 * <li>Copyright: Copyright (c) 2018</li>
 * <li>Company: /</li>
 * </ul>
 *
 * @author swc
 * @version V1.0
 * @date 2020/5/29 0029 上午 10:37
 */
public class FileRootUtil {

    public static String getRoot(String viewRoot) {
        viewRoot  =viewRoot==null||"".equals(viewRoot)?"\\src\\main\\resources\\":viewRoot;
        String root =System.getProperty("user.dir");
        viewRoot = root.split("src\\\\main\\\\java")[0]+viewRoot;
        return viewRoot;
    }
}
